package gameManager;

import java.util.ArrayList;
import java.util.List;

/**
 * PlayerWeap is the weapon for the player in Rec Wars.
 * @author Stephen
 *
 */
public class PlayerWeap extends WeaponObject{
    
    /**
     * Constructor.
     * @param weaponLevel Starting level
     * @param cooldownTime standard cooldown time for this weapon
     * @param parent the GameCharacter this weapon is attached to
     */
    public PlayerWeap (int weaponLevel, int cooldownTime, GameCharacter parent) {
        super(weaponLevel, cooldownTime, parent);
        setWeaponName("Basic Weapon");
    }

    /**
     * Shoots a bullet.
     * @return a list of the bullet object fired.
     */
    @Override
    public List<AmmunitionObject> fire () {
        setPosition(getParent().getCenter());
        List<AmmunitionObject> myAmmo = new ArrayList<AmmunitionObject>();
        myAmmo.add(new PlayerAmmo(getPosition(), 0));
        return myAmmo;
    }

}
